package com.yanqu.road.server.cmd.activity.unionchest;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.UnionChestProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.logic.MessageHelper;
import com.yanqu.road.server.manager.activity.unionchest.CrossUnionChestMgr;
import com.yanqu.road.server.protocol.ClientProtocol;
import com.yanqu.road.server.protocol.CrossProtocol;
import com.yanqu.road.server.protocol.GameProtocol;
import com.yanqu.road.utils.YanQuMessageUtils;


@Cmd(code = CrossProtocol.C2_UNIONCHEST_BOX_NOTICE, desc = "宝箱公告")
public class CrossUnionChestNoticeCmd extends CrossCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {

        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        UnionChestProto.CrossUnionChestNoticeReqMsg reqMsg = UnionChestProto.CrossUnionChestNoticeReqMsg.parseFrom(packet.getBytes());
        YanQuMessage pbMsg = YanQuMessageUtils.buildMessage(ClientProtocol.U_UNIONCHEST_BOX_NOTICE,
                CrossUnionChestMgr.getNoticeListMsg(reqMsg.getActivityId(), reqMsg.getUnionId()));
        MessageHelper.sendPacket(serverId, packet.getPlayerId(), pbMsg);
    }

    @Override
    public void sendData() {
    }
}
